<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class login_controller extends base_controller {
    public $login_model ;
    public function __construct() {
        parent::__construct();
        MagicPHP::callMethod()->importLibarary("Magic_Connection_Model");
        MagicPHP::callMethod()->importLibarary("Magic_CRUD_Model");
        MagicPHP::callMethod()->importLibarary("Magic_Common_Model");
        
        $this->login_model = new login_model();
    }
    public function indexController(){
       $this->form = $this->login_model->sayHello();
       if($_POST){
           Magic_Session_Lib::callMethod()->_setSession("uid",$_POST["username"]);
           Magic_Common_Model::callMethod()->_pageRedirect(SITE_URL."default/index");
        }
        
    }
   
}
?>
